Optimal. Leaf size=102 \[ \frac{(A+B) (c-c \sin (e+f x))^{-p-2} (g \cos (e+f x))^{p+1}}{f g (p+3)}+\frac{(A-B (p+2)) (c-c \sin (e+f x))^{-p-1} (g \cos (e+f x))^{p+1}}{c f g (p+1) (p+3)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.2122, antiderivative size = 102, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 38, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.053, Rules used = {2859, 2671} \[ \frac{(A+B) (c-c \sin (e+f x))^{-p-2} (g \cos (e+f x))^{p+1}}{f g (p+3)}+\frac{(A-B (p+2)) (c-c \sin (e+f x))^{-p-1} (g \cos (e+f x))^{p+1}}{c f g (p+1) (p+3)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2859
Rule 2671
Rubi steps
\begin{align*} \int (g \cos (e+f x))^p (A+B \sin (e+f x)) (c-c \sin (e+f x))^{-2-p} \, dx &=\frac{(A+B) (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{-2-p}}{f g (3+p)}+\frac{(A-B (2+p)) \int (g \cos (e+f x))^p (c-c \sin (e+f x))^{-1-p} \, dx}{c (3+p)}\\ &=\frac{(A+B) (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{-2-p}}{f g (3+p)}+\frac{(A-B (2+p)) (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{-1-p}}{c f g (1+p) (3+p)}\\ \end{align*}
Mathematica [A] time = 0.147402, size = 83, normalized size = 0.81 \[ \frac{\cos (e+f x) (c-c \sin (e+f x))^{-p} (g \cos (e+f x))^p ((B (p+2)-A) \sin (e+f x)+A (p+2)-B)}{c^2 f (p+1) (p+3) (\sin (e+f x)-1)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.595, size = 0, normalized size = 0. \begin{align*} \int \left ( g\cos \left ( fx+e \right ) \right ) ^{p} \left ( A+B\sin \left ( fx+e \right ) \right ) \left ( c-c\sin \left ( fx+e \right ) \right ) ^{-2-p}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (B \sin \left (f x + e\right ) + A\right )} \left (g \cos \left (f x + e\right )\right )^{p}{\left (-c \sin \left (f x + e\right ) + c\right )}^{-p - 2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.49969, size = 200, normalized size = 1.96 \begin{align*} \frac{{\left ({\left (B p - A + 2 \, B\right )} \cos \left (f x + e\right ) \sin \left (f x + e\right ) +{\left (A p + 2 \, A - B\right )} \cos \left (f x + e\right )\right )} \left (g \cos \left (f x + e\right )\right )^{p}{\left (-c \sin \left (f x + e\right ) + c\right )}^{-p - 2}}{f p^{2} + 4 \, f p + 3 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]